const path = require('path');
const fs = require('fs');

const str = fs.readFileSync('./info3.json','utf-8');
const arr = JSON.parse(str);
const num = Math.floor(Math.random()*arr.length);
arr[num].count+=1;
console.log(`这是第${arr[num].count}次抽到${arr[num].name}`,arr[num]);
const newStr = JSON.stringify(arr);
fs.writeFileSync('./info3.json',newStr);
